<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
    <title>配置列表</title>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/theme/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/js/bootstrap/css/bootstrap-table.min.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/theme/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/theme/style.css" />
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.11.3.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/theme/bootstrap.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap/bootstrap-table.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/bootstrap/bootstrap-table-locale-all.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/layerui/layer.min.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/js/layerui/layer.ext.js"></script>
    
    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }
    </style>
</head>
<body>
<!-- <form class="form-inline definewidth m20" action="index.html" method="get">  
玩家ID：<input type="text" name="gameUserId" id="gameUserId"class="abc input-default" placeholder="" value="">&nbsp;&nbsp;  
手机：<input type="text" name="phone" id="phone"class="abc input-default" placeholder="" value="">&nbsp;&nbsp; 
邮箱：<input type="text" name="phone" id="phone"class="abc input-default" placeholder="" value="">&nbsp;&nbsp; 
    <button type="button" onclick="query()" class="btn btn-primary">查询</button>
</form> -->

	<table class="table table-bordered table-hover definewidth m10">
		<thead>
			<tr>
				<th width="10%">状态显示名称</th>
				<th width="15%">状态名字</th>
				<th width="10%">状态数值</th>
				<th  width="7%">操作</th>
			</tr>
		</thead>
		<c:forEach items="${systemStatusInfoList}" var="info">
			<tr>
				<td>${info.statusString}</td>
				<td>${info.statusName}</td>
				<td><input id="pa${info.statusName}" name="" value="${info.statusValue}"> </td>
				<td><a href="javascript:;" onclick="saveParam('${info.statusName}')"> 确认修改</a></td>
			</tr>
		</c:forEach>
	</table>

</body>
<script type="text/javascript">
	function saveParam(statusName){
		var statusValue = $("#pa"+statusName).val();
		$.post("${pageContext.request.contextPath}/admin/param_edit.html",
	            {"statusName":statusName,"statusValue":statusValue},
	       function(data){
	            	var json = eval("("+data+")");
	            	$('#usersave').removeAttr("disabled");  //移除disabled属性 
					if(json.statusCode =='200'){
						layer.msg(json.message, {icon: 1});
						setTimeout("closewind()",2000);
					}else{
						layer.msg(json.message, {shift: 6});
					}
	      });
		
	}

	

    $(function () {
    	
    	

    });

    
	
</script>
</html>